package controllers

// AlertManageMsgData alertmanager传递过来的消息结构体
type AlertManageMsgData struct {
	Receiver     string       `json:"receiver"`
	Status       string       `json:"status"`
	Alerts       []Alerts     `json:"alerts"`
	CommonLabels CommonLabels `json:"commonLabels"`
	ExternalURL  string       `json:"externalURL"`
}

type Labels struct {
	Alertname string `json:"alertname"`
	Instance  string `json:"instance"`
	Severity  string `json:"severity"`
}
type Alerts struct {
	Status      string      `json:"status"`
	Labels      Labels      `json:"labels"`
	StartsAt    string      `json:"startsAt"`
	EndsAt      string      `json:"endsAt"`
	Fingerprint string      `json:"fingerprint"`
	Annotations Annotations `json:"annotations"`
}
type Annotations struct {
	Description string `json:"description"`
}

type CommonLabels struct {
	Alertname string `json:"alertname"`
}

// WechatMsg 企业微信发送的消息体
type WechatMsg struct {
	Msgtype string `json:"msgtype"`
	Text    Text   `json:"text"`
}

type Text struct {
	Content             string   `json:"content"`
	MentionedList       []string `json:"mentioned_list"`
	MentionedMobileList []string `json:"mentioned_mobile_list"`
}

// DingTalkMsg 钉钉发送的消息体
type DingTalkMsg struct {
	Msgtype string `json:"msgtype"`
	Text    Text   `json:"text"`
}
